Skip to content

Add global flag to disable Wave HTML view pages#1086

Closed
gavinelder wants to merge 4 commits into
masterfrom
ge/feat/disable-html-views
Closed

Add global flag to disable Wave HTML view pages#1086
gavinelder wants to merge 4 commits into
masterfrom
ge/feat/disable-html-views

Conversation

@gavinelder

Copy link
Copy Markdown
Contributor

Summary

Adds an installation-level configuration flag wave.views.enabled (default true) that lets operators globally turn off the HTML view pages Wave serves under /view/** — the build, mirror, scan, container, and inspect pages.

When wave.views.enabled=false, ViewController is not loaded (class-level @Requires), so the entire /view/** surface returns 404. Default behaviour is unchanged, so this is fully backward compatible.

Changes

  • ViewController: class-level @Requires(property = 'wave.views.enabled', value = 'true', defaultValue = 'true').
  • application.yml: documented default wave.views.enabled: true.
  • ViewControllerDisabledTest: asserts /view/** returns 404 when the flag is false.

Testing

  • New ViewControllerDisabledTest passes (4/4).
  • Existing ViewControllerTest is unchanged: the same 4 environment-dependent tests (inspect views and the scan-redirect) fail on both master and this branch, so no new failures are introduced by this change.

🤖 Generated with Claude Code

gavinelder and others added 2 commits July 16, 2026 16:00
Introduce an installation-level configuration flag 'wave.views.enabled'
(default true). When set to false, the HTML view pages served under
/view/** (builds, mirrors, scans, containers, inspect) are disabled
globally via a class-level @requires on ViewController, so the whole
/view surface returns 404. Default behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…/absence

Add ViewControllerEnabledTest asserting the ViewController bean is loaded
when wave.views.enabled=true, and assert bean absence in the disabled test,
so the flag is verified in both directions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gavinelder
gavinelder marked this pull request as ready for review July 16, 2026 15:07
gavinelder and others added 2 commits July 16, 2026 16:27
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gavinelder gavinelder closed this Jul 22, 2026
pditommaso added a commit that referenced this pull request Jul 23, 2026
Groups the installation-level capability toggles under a single, consistent
`wave.capabilities.*` config namespace (all default `true`), and adds a
`strict` environment (application-strict.yml) that disables them all at once
for locked-down / regulated deployments.

- wave.capabilities.ephemeral-token       (renames wave.container.pull.enabled, #1089)
- wave.capabilities.credentials-federation (supersedes wave.inject-credentials, #1088)
- wave.capabilities.web-views             (supersedes wave.views.enabled, #1086)

Javadocs, error/log messages and user documentation updated accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pditommaso added a commit that referenced this pull request Jul 23, 2026
)

* feature: consolidate capability toggles under wave.capabilities.*

Groups the installation-level capability toggles under a single, consistent
`wave.capabilities.*` config namespace (all default `true`), and adds a
`strict` environment (application-strict.yml) that disables them all at once
for locked-down / regulated deployments.

- wave.capabilities.ephemeral-token       (renames wave.container.pull.enabled, #1089)
- wave.capabilities.credentials-federation (supersedes wave.inject-credentials, #1088)
- wave.capabilities.web-views             (supersedes wave.views.enabled, #1086)

Javadocs, error/log messages and user documentation updated accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feature: move allowAnonymous under wave.capabilities.anonymous-access

Adds anonymous access as a capability toggle (default true). The legacy
`wave.allowAnonymous` key still works as an undocumented backward-compat alias
via the config fallback expression, and is disabled in the `strict` environment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: verify legacy wave.allowAnonymous backward-compat alias

Adds AnonymousAccessLegacyAliasTest proving the legacy `wave.allowAnonymous`
key still drives `wave.capabilities.anonymous-access` (unset → true default;
false/true overrides honored).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants